<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>星球元宇宙地图 - Vocabuddy词友星球</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: linear-gradient(135deg, #0891b2, #7e22ce);
            height: 100vh;
            margin: 0;
            padding: 0;
            color: white;
        }
        .app-container {
            height: 100%;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
        }
        .nav-bar {
            height: 60px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 10;
        }
        .tab-bar {
            height: 80px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            display: flex;
            justify-content: space-around;
            align-items: center;
            position: fixed;
            bottom: 0;
            width: 100%;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            z-index: 10;
        }
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            transition: all 0.3s ease;
        }
        .tab-item.active {
            color: #ffffff;
        }
        .tab-icon {
            font-size: 24px;
            margin-bottom: 4px;
            position: relative;
        }
        .tab-item.active .tab-icon::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 5px;
            height: 5px;
            background-color: #ffffff;
            border-radius: 50%;
        }
        .content {
            flex: 1;
            overflow: hidden;
            position: relative;
        }
        .planet-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        .planet-surface {
            position: absolute;
            width: 200%;
            height: 200%;
            top: -50%;
            left: -50%;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="50" height="50" fill="%23111122" /><rect x="50" y="50" width="50" height="50" fill="%23111122" /><rect x="50" y="0" width="50" height="50" fill="%23191930" /><rect x="0" y="50" width="50" height="50" fill="%23191930" /></svg>');
            transform: perspective(1000px) rotateX(60deg);
            transform-origin: center center;
            display: grid;
            grid-template-columns: repeat(20, 1fr);
            grid-template-rows: repeat(20, 1fr);
            gap: 5px;
            padding: 5px;
        }
        .building {
            position: relative;
            transform-style: preserve-3d;
            transform: translateZ(0);
            transition: all 0.3s ease;
        }
        .building:hover {
            transform: translateZ(20px) scale(1.1);
            z-index: 5;
        }
        .building-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 10;
        }
        .building:hover .building-tooltip {
            opacity: 1;
        }
        .library {
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, #3b82f6, #1e40af);
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
            display: flex;
            justify-content: center;
            align-items: flex-end;
        }
        .library::before {
            content: '📚';
            font-size: 20px;
            margin-bottom: 5px;
        }
        .power-plant {
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, #10b981, #047857);
            border-radius: 5px;
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.7);
            display: flex;
            justify-content: center;
            align-items: flex-end;
            animation: pulse 2s infinite;
        }
        .power-plant::before {
            content: '⚡';
            font-size: 20px;
            margin-bottom: 5px;
        }
        @keyframes pulse {
            0%, 100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.7); }
            50% { box-shadow: 0 0 25px rgba(16, 185, 129, 1); }
        }
        .alien-plant {
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, #8b5cf6, #6d28d9);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
        }
        .alien-plant::before {
            content: '🌱';
            font-size: 20px;
        }
        .alien-plant::after {
            content: '';
            position: absolute;
            top: -10px;
            left: -10px;
            right: -10px;
            bottom: -10px;
            background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
            z-index: -1;
            animation: rotate 10s linear infinite;
        }
        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .friend-pet {
            width: 100%;
            height: 100%;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .pet-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background-size: cover;
            background-position: center;
            border: 2px solid white;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
            position: relative;
            z-index: 2;
        }
        .speech-bubble {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            color: #333;
            padding: 5px 10px;
            border-radius: 10px;
            font-size: 10px;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .speech-bubble::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 5px solid white;
        }
        .friend-pet:hover .speech-bubble {
            opacity: 1;
        }
        .knowledge-fountain {
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, #f59e0b, #d97706);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            animation: fountain 3s infinite;
        }
        .knowledge-fountain::before {
            content: '💧';
            font-size: 20px;
        }
        @keyframes fountain {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        .hot-words {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(0, 0, 0, 0.8);
            padding: 20px;
            display: none;
            z-index: 20;
            max-height: 300px;
            overflow-y: auto;
        }
        .hot-word-item {
            display: flex;
            justify-content: space-between;
            padding: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        .hot-word-rank {
            width: 24px;
            height: 24px;
            background: #f59e0b;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
            margin-right: 10px;
        }
        .hot-word-text {
            flex: 1;
        }
        .hot-word-count {
            color: #f59e0b;
            font-weight: bold;
        }
        .close-hot-words {
            position: absolute;
            top: 10px;
            right: 10px;
            background: none;
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
        }
        .sponsor-tile {
            position: absolute;
            width: 50px;
            height: 50px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            animation: blink 2s infinite;
        }
        @keyframes blink {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }
        .planet-controls {
            position: absolute;
            bottom: 100px;
            right: 20px;
            display: flex;
            flex-direction: column;
            z-index: 5;
        }
        .control-btn {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
            font-size: 18px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .control-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }
        .planet-info {
            position: absolute;
            top: 70px;
            left: 20px;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            border-radius: 10px;
            padding: 10px 15px;
            z-index: 5;
        }
        .planet-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
        }
        .planet-stats {
            display: flex;
            gap: 15px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.8);
        }
        .planet-stat {
            display: flex;
            align-items: center;
        }
        .planet-stat i {
            margin-right: 5px;
        }
    </style>
</head>
<body>
    <div class="app-container">
        <div class="nav-bar">
            <div>
                <i class="fas fa-arrow-left mr-3"></i>
                <span>星球元宇宙</span>
            </div>
            <div>
                <i class="fas fa-share-alt"></i>
            </div>
        </div>
        
        <div class="content">
            <div class="planet-info">
                <div class="planet-name">词汇星球 #42801</div>
                <div class="planet-stats">
                    <div class="planet-stat">
                        <i class="fas fa-building"></i>
                        <span>12 建筑</span>
                    </div>
                    <div class="planet-stat">
                        <i class="fas fa-users"></i>
                        <span>5 访客</span>
                    </div>
                    <div class="planet-stat">
                        <i class="fas fa-star"></i>
                        <span>Level 7</span>
                    </div>
                </div>
            </div>
            
            <div class="planet-container">
                <div class="planet-surface">
                    <!-- 图书馆 - 高度=总单词量 -->
                    <div class="building" style="grid-column: 5 / span 2; grid-row: 5 / span 2; height: 150px;">
                        <div class="library"></div>
                        <div class="building-tooltip">词汇图书馆 - 已收集487个单词</div>
                    </div>
                    
                    <!-- 发电厂 - 亮度=近期活跃度 -->
                    <div class="building" style="grid-column: 8 / span 2; grid-row: 7 / span 2; height: 100px;">
                        <div class="power-plant"></div>
                        <div class="building-tooltip">能量发电厂 - 近7天活跃度: 85%</div>
                    </div>
                    
                    <!-- 外星植物 - 形态=错误率最高的词根 -->
                    <div class="building" style="grid-column: 3; grid-row: 8; height: 80px;">
                        <div class="alien-plant"></div>
                        <div class="building-tooltip">异形植物 - 词根"trans-"错误率: 68%</div>
                    </div>
                    <div class="building" style="grid-column: 10; grid-row: 4; height: 60px;">
                        <div class="alien-plant"></div>
                        <div class="building-tooltip">异形植物 - 词根"pre-"错误率: 42%</div>
                    </div>
                    
                    <!-- 好友宠物 -->
                    <div class="building" style="grid-column: 7; grid-row: 3; height: 40px;">
                        <div class="friend-pet">
                            <div class="pet-avatar" style="background-image: url('https://images.unsplash.com/photo-1599839575945-a9e5af0c3fa5?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80');"></div>
                            <div class="speech-bubble">今日学习: astronomy, galaxy, nebula</div>
                        </div>
                    </div>
                    <div class="building" style="grid-column: 9; grid-row: 9; height: 40px;">
                        <div class="friend-pet">
                            <div class="pet-avatar" style="background-image: url('https://images.unsplash.com/photo-1511367461989-f85a21fda167?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80');"></div>
                            <div class="speech-bubble">今日学习: quantum, physics, theory</div>
                        </div>
                    </div>
                    
                    <!-- 知识喷泉 -->
                    <div class="building" style="grid-column: 6; grid-row: 6; height: 70px;" id="knowledgeFountain">
                        <div class="knowledge-fountain"></div>
                        <div class="building-tooltip">知识喷泉 - 点击查看社区热词</div>
                    </div>
                    
                    <!-- 赞助商地砖 -->
                    <div class="sponsor-tile" style="bottom: 150px; right: 100px;">🎓</div>
                    <div class="sponsor-tile" style="bottom: 220px; left: 120px;">🔍</div>
                </div>
            </div>
            
            <!-- 热词弹窗 -->
            <div class="hot-words" id="hotWords">
                <button class="close-hot-words" id="closeHotWords">&times;</button>
                <h3 class="text-xl font-bold mb-4">社区热词榜</h3>
                <div class="hot-word-item">
                    <div class="hot-word-rank">1</div>
                    <div class="hot-word-text">metaverse</div>
                    <div class="hot-word-count">1,245</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">2</div>
                    <div class="hot-word-text">cryptocurrency</div>
                    <div class="hot-word-count">987</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">3</div>
                    <div class="hot-word-text">algorithm</div>
                    <div class="hot-word-count">856</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">4</div>
                    <div class="hot-word-text">quantum</div>
                    <div class="hot-word-count">742</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">5</div>
                    <div class="hot-word-text">blockchain</div>
                    <div class="hot-word-count">698</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">6</div>
                    <div class="hot-word-text">artificial</div>
                    <div class="hot-word-count">645</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">7</div>
                    <div class="hot-word-text">intelligence</div>
                    <div class="hot-word-count">621</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">8</div>
                    <div class="hot-word-text">sustainable</div>
                    <div class="hot-word-count">589</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">9</div>
                    <div class="hot-word-text">innovation</div>
                    <div class="hot-word-count">547</div>
                </div>
                <div class="hot-word-item">
                    <div class="hot-word-rank">10</div>
                    <div class="hot-word-text">paradigm</div>
                    <div class="hot-word-count">512</div>
                </div>
            </div>
            
            <div class="planet-controls">
                <div class="control-btn">
                    <i class="fas fa-plus"></i>
                </div>
                <div class="control-btn">
                    <i class="fas fa-minus"></i>
                </div>
                <div class="control-btn">
                    <i class="fas fa-arrows-alt"></i>
                </div>
            </div>
        </div>
        
        <div class="tab-bar">
            <div class="tab-item">
                <div class="tab-icon"><i class="fas fa-book"></i></div>
                <div>学习</div>
            </div>
            <div class="tab-item active">
                <div class="tab-icon"><i class="fas fa-planet-ringed"></i></div>
                <div>星球</div>
            </div>
            <div class="tab-item">
                <div class="tab-icon"><i class="fas fa-users"></i></div>
                <div>社交</div>
            </div>
            <div class="tab-item">
                <div class="tab-icon"><i class="fas fa-store"></i></div>
                <div>商店</div>
            </div>
        </div>
    </div>
    
    <script>
        // 知识喷泉点击事件
        document.getElementById('knowledgeFountain').addEventListener('click', function() {
            document.getElementById('hotWords').style.display = 'block';
        });
        
        // 关闭热词弹窗
        document.getElementById('closeHotWords').addEventListener('click', function() {
            document.getElementById('hotWords').style.display = 'none';
        });
        
        // 简单的拖动效果模拟
        const planetSurface = document.querySelector('.planet-surface');
        let isDragging = false;
        let startX, startY, scrollLeft, scrollTop;
        
        planetSurface.addEventListener('mousedown', function(e) {
            isDragging = true;
            startX = e.pageX - planetSurface.offsetLeft;
            startY = e.pageY - planetSurface.offsetTop;
            scrollLeft = planetSurface.scrollLeft;
            scrollTop = planetSurface.scrollTop;
        });
        
        planetSurface.addEventListener('mouseleave', function() {
            isDragging = false;
        });
        
        planetSurface.addEventListener('mouseup', function() {
            isDragging = false;
        });
        
        planetSurface.addEventListener('mousemove', function(e) {
            if (!isDragging) return;
            e.preventDefault();
            const x = e.pageX - planetSurface.offsetLeft;
            const y = e.pageY - planetSurface.offsetTop;
            const walkX = (x - startX) * 2;
            const walkY = (y - startY) * 2;
            planetSurface.scrollLeft = scrollLeft - walkX;
            planetSurface.scrollTop = scrollTop - walkY;
        });
    </script>
</body>
</html>